home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / B-C / C++ CDEV.cpt / C++ CDEV ƒ / UHandleObject.h / UHandleObject.h
Encoding:
C/C++ Source or Header  |  1991-08-24  |  913 b   |  48 lines  |  [TEXT/MPS ]

  1. /*
  2.  *    UHandleObject.h
  3.  *    based on Relocatable.h by Patrick C. Beard. ©1989,90 by Patrick Beard.
  4.  *    
  5.  *    KNOWN BUGS AND SHORTCOMINGS:
  6.  *        [none]
  7.  */
  8.  
  9. #ifndef __UHANDLEOBJECT__
  10. #define __UHANDLEOBJECT__
  11.  
  12. #ifndef __MEMORY__
  13. #include <Memory.h>
  14. #endif
  15.  
  16. class THandleObject: private HandleObject {
  17.     protected:
  18.         SignedByte GetState();
  19.         void Lock();
  20.         SignedByte LockHigh();
  21.         void MoveHigh();
  22.         void SetState(SignedByte flags);
  23.         void Unlock();
  24. };
  25.  
  26. /* —————————————————————————————————— inline definitions —————————————————————————————————— */
  27.  
  28. inline SignedByte THandleObject::GetState() {
  29.     return HGetState((Handle)this);
  30. }
  31.  
  32. inline void THandleObject::Lock() {
  33.     HLock((Handle)this);
  34. }
  35.  
  36. inline void THandleObject::MoveHigh() {
  37.     MoveHHi((Handle)this);
  38. }
  39.  
  40. inline void THandleObject::SetState(SignedByte flags) {
  41.     HSetState((Handle)this, flags);
  42. }
  43.  
  44. inline void THandleObject::Unlock() {
  45.     HUnlock((Handle)this);
  46. }
  47.  
  48. #endif